package Fish;

import javax.swing.ImageIcon;
import javax.swing.JLabel;

import Frame.GamePanel;

public class Fish{
	private int count; // hp
	public int hp;
	private int damage; 
	private int x,y;
	private boolean item;//check the have a item
	private String name;
	private int height, width;
	
	public boolean visible;
	public double makeTime;
	public int maxNum;
	public double speed;
	
	ImageIcon icon;
	JLabel label;
	
	public Fish(int count, int damage){
		this.count=count;
		this.damage=damage;
		visible=false;
	}
	
	
	//getter & setter
	public int getX() {
		return x;
	}
	public void setX(int x) {
		this.x = x;
		label.setLocation(x, y);
	}
	public int getY() {
		return y;
	}
	public void setY(int y) {
		this.y = y;
		label.setLocation(x, y);
	}
	public void setY(double y) {
		this.y = (int)y;
		label.setLocation(x, this.y);
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public int getDamage() {
		return damage;
	}
	public void setDamage(int damage) {
		this.damage = damage;
	}
	public boolean getItem() {
		return item;
	}
	public void setItem(boolean item) {
		this.item = item;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	public int attack(Character c,int count){
		count=-c.getDamage();
		return count;
	}
	public JLabel getLabel(){
		return label;
	}
	public void setLocation(int x, int y){
		this.x=x;
		this.y=y;
		label.setLocation(x,y);
	}
	
	public int getHeight(){
		return height;
	}
	public int getWidth(){
		return width;
	}
	public void setHeight(int height){
		this.height = height;
	}
	public void setWidth(int width){
		this.width = width;
	}
}
